/**
 * Created by DELL on 2017/4/18.
 */
// const testHelper=require('./ulti/sortTestHelper');
const swap=require('./ulti/swap');
//插入排序
const insertionSort=function (arr){
    var len=arr.length,key,temp,i,j;
    for(i=1;i<len;i++){
        key=i;
        temp=arr[key];
        for(j=key-1;j>=0&&arr[j]>temp;j--){
             arr[j + 1]=arr[j];
        }
        arr[j+1]=temp;
    }
    console.log('插入排序:');
};
module.exports=insertionSort;
